#pragma once
#include <allegro5/allegro.h>
#include "Map.h"
#include "WorldMap.h"
#include "CityMap.h"
#include "MazeMap.h"
#include "Input.h"
#include "Renderer.h"
#include "Character.h"
#include "Transition.h"
#include "Menu.h"

class Game
{
	public:
		Game(Renderer* aRenderer);
		~Game();

		static int tps;
		static int ticks;
		static int fps;

		bool exitFlag;

		static Phrase* title;
		ALLEGRO_TIMER* GetTimer() {return timer;};
		Map* GetMap() {return currMap;};

		void ProceedInput(Input* aInput);

		void Tick();
		bool IsDynamic() {return isDynamic;};

		static Character* GetHero() { return hero;};

	private:
		ALLEGRO_TIMER* timer;
		bool inputLocked;
		bool isDynamic;
		int seed;
		int nextSeed;

		Transition* transition;
		Renderer* renderer;
		Menu* menu;
		Menu* mainMenu;

		WorldMap* worldMap;
		Map* currMap;
		static Character* hero;

		void CreateGame();
		void RegenerateWorld();
};